#ifndef _KLAS_SPRITE_HPP_
#define _KLAS_SPRITE_HPP_

#include "../Platform.hpp"
#include "Renderable.hpp"
#include "Texture.hpp"
#include "Color.hpp"

namespace klas
{
  namespace graphics
  {
    //! A class that allows easy texture rendering.
    class KLAS_API Sprite: public Renderable
    {
    public:
      //! Creates a new sprite from a texture, a transformation, and optionally a shading color.
      Sprite(Texture* tex, const Transformation& transform, const Color& col = colors::White);

      //! Change the shading color of the sprite.
      void setColor(const Color& col);

      //! Gets the shading color of the sprite.
      Color getColor() const;


    protected:

      //! Renders the sprite.
      virtual void renderElement(RenderingCore* core, const math::Vector2d& origin);

      Texture* m_tex;  //! The sprite's texture.
      Color m_col; //! The shading color of the sprite.

    };
  }
}

#endif